package com.erpanderp.wam.util;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.ServletContext;

public class WAMHostManager {
	public static Map<String, String> getWAMHosts(ServletContext servletContext){
		Map<String, String> wamHosts = new HashMap<String, String>();
		if (servletContext.getInitParameter("javax.faces.PROJECT_STAGE").equals("Development")) {
			wamHosts.put(CommonLookup.PRIVATEHOST, servletContext.getInitParameter("developmentHost"));
			wamHosts.put(CommonLookup.PUBLICHOST, servletContext.getInitParameter("developmentHost"));	
			wamHosts.put(CommonLookup.DEV_EMAIL, servletContext.getInitParameter("devEmail"));
		} else {
			wamHosts.put(CommonLookup.PRIVATEHOST, servletContext.getInitParameter("privateHost"));
			wamHosts.put(CommonLookup.PUBLICHOST, servletContext.getInitParameter("publicHost"));
		}
		return wamHosts;
	}

}
